package com.niiwoo.civet.account.service.local;

import com.niiwoo.civet.account.dao.entity.ActivateAccountOrder;
import com.niiwoo.civet.account.dao.mapper.ActivateAccountOrderMapperExt;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ActivateAccountOrderService {

    @Autowired
    ActivateAccountOrderMapperExt activateAccountOrderMapper;

    /**
     * 获取订单
     *
     * @param requestNo 请求流水号
     */
    public ActivateAccountOrder getByRequestNo(String requestNo) {
        return activateAccountOrderMapper.selectByRequestNo(requestNo);
    }

    public boolean saveOrder(ActivateAccountOrder order) {
        return activateAccountOrderMapper.insertSelective(order) > 0;
    }

    public boolean updateOrder(ActivateAccountOrder order) {
        return activateAccountOrderMapper.updateByPrimaryKeySelective(order) > 0;
    }


}
